/**
 * 过滤器
 */

/**
 * 时间戳转换日期时间格式
 * time 时间
 */
export function dateformat(time) {
    let dateTime = new Date(parseInt(time) * 1000)
    let year = dateTime.getFullYear();
    let month = dateTime.getMonth() + 1;
    let day = dateTime.getDate();
    let hour = dateTime.getHours();
    let minute = dateTime.getMinutes();
    // let second = dateTime.getSeconds();
    // let now = new Date();
    // let now_new = Date.parse(now.toDateString());  //typescript转换写法
    // let milliseconds = now_new - dateTime;
    let timeSpanStr = year + '-' + month + '-' + day + ' ' + hour + ':' + minute;
    return timeSpanStr;
}
/**
 * 拼接图片路径
 * url  原图片路径
 */
export function joinPicUrl(url) {
    return 'http://insidexkd.oss-cn-shanghai.aliyuncs.com/' + url
}